import { request } from "@/request/request";

export const favoritesList = () =>
  request({
    url: "/user/favorites",
  });

export const CheckFavorite = (id) =>
  request({
    url: `/user/favorites/${id}`,
  });

//添加收藏
export const AddFavorite = (id) =>
  request({
    url: `/user/favorites/${id}`,
    method: "POST",
  });

// 取消收藏
export const DelFavorite = (id) =>
  request({
    url: `/user/favorites/${id}`,
    method: "DELETE",
  });
